﻿using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Wexflow.Tasks.Tests
{
    [TestClass]
    public class MediaInfo
    {
        private static readonly string MediaInfoFolder = @"C:\WexflowTesting\MediaInfo\";
        private static readonly string ExpectedResult =
            "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"
+ "<Files>\r\n"
+ "  <File path=\"C:\\WexflowTesting\\WAV\\kof.wav\" name=\"kof.wav\">\r\n"
+ "    <General>\r\n"
+ "      <Tag name=\"Count\" value=\"325\" />\r\n"
+ "      <Tag name=\"Count of stream of this kind\" value=\"1\" />\r\n"
+ "      <Tag name=\"Kind of stream\" value=\"General\" />\r\n"
+ "      <Tag name=\"Kind of stream\" value=\"General\" />\r\n"
+ "      <Tag name=\"Stream identifier\" value=\"0\" />\r\n"
+ "      <Tag name=\"Count of audio streams\" value=\"1\" />\r\n"
+ "      <Tag name=\"Audio_Format_List\" value=\"PCM\" />\r\n"
+ "      <Tag name=\"Audio_Format_WithHint_List\" value=\"PCM\" />\r\n"
+ "      <Tag name=\"Audio codecs\" value=\"PCM\" />\r\n"
+ "      <Tag name=\"Complete name\" value=\"C\" />\r\n"
+ "      <Tag name=\"Folder name\" value=\"C\" />\r\n"
+ "      <Tag name=\"File name\" value=\"kof\" />\r\n"
+ "      <Tag name=\"File extension\" value=\"wav\" />\r\n"
+ "      <Tag name=\"Format\" value=\"Wave\" />\r\n"
+ "      <Tag name=\"Format\" value=\"Wave\" />\r\n"
+ "      <Tag name=\"Format/Extensions usually used\" value=\"act wav\" />\r\n"
+ "      <Tag name=\"Commercial name\" value=\"Wave\" />\r\n"
+ "      <Tag name=\"Internet media type\" value=\"audio/vnd.wave\" />\r\n"
+ "      <Tag name=\"Codec\" value=\"Wave\" />\r\n"
+ "      <Tag name=\"Codec\" value=\"Wave\" />\r\n"
+ "      <Tag name=\"Codec/Extensions usually used\" value=\"act wav\" />\r\n"
+ "      <Tag name=\"File size\" value=\"39446\" />\r\n"
+ "      <Tag name=\"File size\" value=\"38.5 KiB\" />\r\n"
+ "      <Tag name=\"File size\" value=\"39 KiB\" />\r\n"
+ "      <Tag name=\"File size\" value=\"39 KiB\" />\r\n"
+ "      <Tag name=\"File size\" value=\"38.5 KiB\" />\r\n"
+ "      <Tag name=\"File size\" value=\"38.52 KiB\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"1786\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"1 s 786 ms\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"1 s 786 ms\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"1 s 786 ms\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"00\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"00\" />\r\n"
+ "      <Tag name=\"Overall bit rate mode\" value=\"CBR\" />\r\n"
+ "      <Tag name=\"Overall bit rate mode\" value=\"Constant\" />\r\n"
+ "      <Tag name=\"Overall bit rate\" value=\"176690\" />\r\n"
+ "      <Tag name=\"Overall bit rate\" value=\"177 kb/s\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"44\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"44.0 Bytes (0%)\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"44 Bytes\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"44 Bytes\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"44.0 Bytes\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"44.00 Bytes\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"44.0 Bytes (0%)\" />\r\n"
+ "      <Tag name=\"Proportion of this stream\" value=\"0.00112\" />\r\n"
+ "      <Tag name=\"File creation date\" value=\"UTC 2017-02-17 22\" />\r\n"
+ "      <Tag name=\"File creation date (local)\" value=\"2017-02-17 23\" />\r\n"
+ "      <Tag name=\"File last modification date\" value=\"UTC 2017-02-17 19\" />\r\n"
+ "      <Tag name=\"File last modification date (local)\" value=\"2017-02-17 20\" />\r\n"
+ "    </General>\r\n"
+ "    <Audio>\r\n"
+ "      <Tag name=\"Count\" value=\"275\" />\r\n"
+ "      <Tag name=\"Count of stream of this kind\" value=\"1\" />\r\n"
+ "      <Tag name=\"Kind of stream\" value=\"Audio\" />\r\n"
+ "      <Tag name=\"Kind of stream\" value=\"Audio\" />\r\n"
+ "      <Tag name=\"Stream identifier\" value=\"0\" />\r\n"
+ "      <Tag name=\"Format\" value=\"PCM\" />\r\n"
+ "      <Tag name=\"Commercial name\" value=\"PCM\" />\r\n"
+ "      <Tag name=\"Format settings\" value=\"Little / Unsigned\" />\r\n"
+ "      <Tag name=\"Format settings, Endianness\" value=\"Little\" />\r\n"
+ "      <Tag name=\"Format settings, Sign\" value=\"Unsigned\" />\r\n"
+ "      <Tag name=\"Codec ID\" value=\"1\" />\r\n"
+ "      <Tag name=\"Codec ID/Url\" value=\"http\" />\r\n"
+ "      <Tag name=\"Codec\" value=\"PCM\" />\r\n"
+ "      <Tag name=\"Codec\" value=\"PCM\" />\r\n"
+ "      <Tag name=\"Codec/Family\" value=\"PCM\" />\r\n"
+ "      <Tag name=\"Codec/Info\" value=\"Microsoft PCM\" />\r\n"
+ "      <Tag name=\"Codec/Url\" value=\"http\" />\r\n"
+ "      <Tag name=\"Codec/CC\" value=\"1\" />\r\n"
+ "      <Tag name=\"Codec settings\" value=\"Little / Unsigned\" />\r\n"
+ "      <Tag name=\"Codec settings, Endianness\" value=\"Little\" />\r\n"
+ "      <Tag name=\"Codec settings, Sign\" value=\"Unsigned\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"1786\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"1 s 786 ms\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"1 s 786 ms\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"1 s 786 ms\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"00\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"00\" />\r\n"
+ "      <Tag name=\"Bit rate mode\" value=\"CBR\" />\r\n"
+ "      <Tag name=\"Bit rate mode\" value=\"Constant\" />\r\n"
+ "      <Tag name=\"Bit rate\" value=\"176400\" />\r\n"
+ "      <Tag name=\"Bit rate\" value=\"176.4 kb/s\" />\r\n"
+ "      <Tag name=\"Channel(s)\" value=\"1\" />\r\n"
+ "      <Tag name=\"Channel(s)\" value=\"1 channel\" />\r\n"
+ "      <Tag name=\"Sampling rate\" value=\"22050\" />\r\n"
+ "      <Tag name=\"Sampling rate\" value=\"22.05 kHz\" />\r\n"
+ "      <Tag name=\"Samples count\" value=\"39381\" />\r\n"
+ "      <Tag name=\"Resolution\" value=\"8\" />\r\n"
+ "      <Tag name=\"Resolution\" value=\"8 bits\" />\r\n"
+ "      <Tag name=\"Bit depth\" value=\"8\" />\r\n"
+ "      <Tag name=\"Bit depth\" value=\"8 bits\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"39402\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"38.5 KiB (100%)\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"38 KiB\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"38 KiB\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"38.5 KiB\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"38.48 KiB\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"38.5 KiB (100%)\" />\r\n"
+ "      <Tag name=\"Proportion of this stream\" value=\"0.99888\" />\r\n"
+ "    </Audio>\r\n"
+ "  </File>\r\n"
+ "  <File path=\"C:\\WexflowTesting\\MP4\\small.mp4\" name=\"small.mp4\">\r\n"
+ "    <General>\r\n"
+ "      <Tag name=\"Count\" value=\"325\" />\r\n"
+ "      <Tag name=\"Count of stream of this kind\" value=\"1\" />\r\n"
+ "      <Tag name=\"Kind of stream\" value=\"General\" />\r\n"
+ "      <Tag name=\"Kind of stream\" value=\"General\" />\r\n"
+ "      <Tag name=\"Stream identifier\" value=\"0\" />\r\n"
+ "      <Tag name=\"Count of video streams\" value=\"1\" />\r\n"
+ "      <Tag name=\"Count of audio streams\" value=\"1\" />\r\n"
+ "      <Tag name=\"Video_Format_List\" value=\"AVC\" />\r\n"
+ "      <Tag name=\"Video_Format_WithHint_List\" value=\"AVC\" />\r\n"
+ "      <Tag name=\"Codecs Video\" value=\"AVC\" />\r\n"
+ "      <Tag name=\"Audio_Format_List\" value=\"AAC\" />\r\n"
+ "      <Tag name=\"Audio_Format_WithHint_List\" value=\"AAC\" />\r\n"
+ "      <Tag name=\"Audio codecs\" value=\"AAC LC\" />\r\n"
+ "      <Tag name=\"Audio_Language_List\" value=\"English\" />\r\n"
+ "      <Tag name=\"Complete name\" value=\"C\" />\r\n"
+ "      <Tag name=\"Folder name\" value=\"C\" />\r\n"
+ "      <Tag name=\"File name\" value=\"small\" />\r\n"
+ "      <Tag name=\"File extension\" value=\"mp4\" />\r\n"
+ "      <Tag name=\"Format\" value=\"MPEG-4\" />\r\n"
+ "      <Tag name=\"Format\" value=\"MPEG-4\" />\r\n"
+ "      <Tag name=\"Format/Extensions usually used\" value=\"mov mp4 m4v m4a m4b m4p 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v\" />\r\n"
+ "      <Tag name=\"Commercial name\" value=\"MPEG-4\" />\r\n"
+ "      <Tag name=\"Format profile\" value=\"Base Media / Version 2\" />\r\n"
+ "      <Tag name=\"Internet media type\" value=\"video/mp4\" />\r\n"
+ "      <Tag name=\"Codec ID\" value=\"mp42\" />\r\n"
+ "      <Tag name=\"Codec ID\" value=\"mp42 (mp42/isom/avc1)\" />\r\n"
+ "      <Tag name=\"Codec ID/Url\" value=\"http\" />\r\n"
+ "      <Tag name=\"CodecID_Compatible\" value=\"mp42/isom/avc1\" />\r\n"
+ "      <Tag name=\"Codec\" value=\"MPEG-4\" />\r\n"
+ "      <Tag name=\"Codec\" value=\"MPEG-4\" />\r\n"
+ "      <Tag name=\"Codec/Extensions usually used\" value=\"mov mp4 m4v m4a m4b m4p 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v\" />\r\n"
+ "      <Tag name=\"File size\" value=\"383631\" />\r\n"
+ "      <Tag name=\"File size\" value=\"375 KiB\" />\r\n"
+ "      <Tag name=\"File size\" value=\"375 KiB\" />\r\n"
+ "      <Tag name=\"File size\" value=\"375 KiB\" />\r\n"
+ "      <Tag name=\"File size\" value=\"375 KiB\" />\r\n"
+ "      <Tag name=\"File size\" value=\"374.6 KiB\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"5568\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"5 s 568 ms\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"5 s 568 ms\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"5 s 568 ms\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"00\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"00\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"00\" />\r\n"
+ "      <Tag name=\"Overall bit rate mode\" value=\"VBR\" />\r\n"
+ "      <Tag name=\"Overall bit rate mode\" value=\"Variable\" />\r\n"
+ "      <Tag name=\"Overall bit rate\" value=\"551194\" />\r\n"
+ "      <Tag name=\"Overall bit rate\" value=\"551 kb/s\" />\r\n"
+ "      <Tag name=\"Frame rate\" value=\"30.000\" />\r\n"
+ "      <Tag name=\"Frame rate\" value=\"30.000 FPS\" />\r\n"
+ "      <Tag name=\"Frame count\" value=\"166\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"3759\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"3.67 KiB (1%)\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"4 KiB\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"3.7 KiB\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"3.67 KiB\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"3.671 KiB\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"3.67 KiB (1%)\" />\r\n"
+ "      <Tag name=\"Proportion of this stream\" value=\"0.00980\" />\r\n"
+ "      <Tag name=\"HeaderSize\" value=\"160\" />\r\n"
+ "      <Tag name=\"DataSize\" value=\"379880\" />\r\n"
+ "      <Tag name=\"FooterSize\" value=\"3591\" />\r\n"
+ "      <Tag name=\"IsStreamable\" value=\"No\" />\r\n"
+ "      <Tag name=\"Encoded date\" value=\"UTC 2010-03-20 21\" />\r\n"
+ "      <Tag name=\"Tagged date\" value=\"UTC 2010-03-20 21\" />\r\n"
+ "      <Tag name=\"File creation date\" value=\"UTC 2017-10-24 10\" />\r\n"
+ "      <Tag name=\"File creation date (local)\" value=\"2017-10-24 11\" />\r\n"
+ "      <Tag name=\"File last modification date\" value=\"UTC 2017-10-24 10\" />\r\n"
+ "      <Tag name=\"File last modification date (local)\" value=\"2017-10-24 11\" />\r\n"
+ "      <Tag name=\"Writing application\" value=\"HandBrake 0.9.4 2009112300\" />\r\n"
+ "      <Tag name=\"Writing application\" value=\"HandBrake 0.9.4 2009112300\" />\r\n"
+ "    </General>\r\n"
+ "    <Video>\r\n"
+ "      <Tag name=\"Count\" value=\"338\" />\r\n"
+ "      <Tag name=\"Count of stream of this kind\" value=\"1\" />\r\n"
+ "      <Tag name=\"Kind of stream\" value=\"Video\" />\r\n"
+ "      <Tag name=\"Kind of stream\" value=\"Video\" />\r\n"
+ "      <Tag name=\"Stream identifier\" value=\"0\" />\r\n"
+ "      <Tag name=\"StreamOrder\" value=\"0\" />\r\n"
+ "      <Tag name=\"ID\" value=\"1\" />\r\n"
+ "      <Tag name=\"ID\" value=\"1\" />\r\n"
+ "      <Tag name=\"Format\" value=\"AVC\" />\r\n"
+ "      <Tag name=\"Format/Info\" value=\"Advanced Video Codec\" />\r\n"
+ "      <Tag name=\"Format/Url\" value=\"http\" />\r\n"
+ "      <Tag name=\"Commercial name\" value=\"AVC\" />\r\n"
+ "      <Tag name=\"Format profile\" value=\"Baseline@L3\" />\r\n"
+ "      <Tag name=\"Format settings\" value=\"2 Ref Frames\" />\r\n"
+ "      <Tag name=\"Format settings, CABAC\" value=\"No\" />\r\n"
+ "      <Tag name=\"Format settings, CABAC\" value=\"No\" />\r\n"
+ "      <Tag name=\"Format settings, RefFrames\" value=\"2\" />\r\n"
+ "      <Tag name=\"Format settings, RefFrames\" value=\"2 frames\" />\r\n"
+ "      <Tag name=\"Internet media type\" value=\"video/H264\" />\r\n"
+ "      <Tag name=\"Codec ID\" value=\"avc1\" />\r\n"
+ "      <Tag name=\"Codec ID/Info\" value=\"Advanced Video Coding\" />\r\n"
+ "      <Tag name=\"Codec\" value=\"AVC\" />\r\n"
+ "      <Tag name=\"Codec\" value=\"AVC\" />\r\n"
+ "      <Tag name=\"Codec/Family\" value=\"AVC\" />\r\n"
+ "      <Tag name=\"Codec/Info\" value=\"Advanced Video Codec\" />\r\n"
+ "      <Tag name=\"Codec/Url\" value=\"http\" />\r\n"
+ "      <Tag name=\"Codec/CC\" value=\"avc1\" />\r\n"
+ "      <Tag name=\"Codec profile\" value=\"Baseline@L3\" />\r\n"
+ "      <Tag name=\"Codec settings\" value=\"2 Ref Frames\" />\r\n"
+ "      <Tag name=\"Codec settings, CABAC\" value=\"No\" />\r\n"
+ "      <Tag name=\"Codec_Settings_RefFrames\" value=\"2\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"5533\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"5 s 533 ms\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"5 s 533 ms\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"5 s 533 ms\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"00\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"00\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"00\" />\r\n"
+ "      <Tag name=\"Bit rate\" value=\"465642\" />\r\n"
+ "      <Tag name=\"Bit rate\" value=\"466 kb/s\" />\r\n"
+ "      <Tag name=\"Width\" value=\"560\" />\r\n"
+ "      <Tag name=\"Width\" value=\"560 pixels\" />\r\n"
+ "      <Tag name=\"Height\" value=\"320\" />\r\n"
+ "      <Tag name=\"Height\" value=\"320 pixels\" />\r\n"
+ "      <Tag name=\"Sampled_Width\" value=\"560\" />\r\n"
+ "      <Tag name=\"Sampled_Height\" value=\"320\" />\r\n"
+ "      <Tag name=\"Pixel aspect ratio\" value=\"1.000\" />\r\n"
+ "      <Tag name=\"Display aspect ratio\" value=\"1.750\" />\r\n"
+ "      <Tag name=\"Display aspect ratio\" value=\"16\" />\r\n"
+ "      <Tag name=\"Rotation\" value=\"0.000\" />\r\n"
+ "      <Tag name=\"Frame rate mode\" value=\"CFR\" />\r\n"
+ "      <Tag name=\"Frame rate mode\" value=\"Constant\" />\r\n"
+ "      <Tag name=\"Frame rate\" value=\"30.000\" />\r\n"
+ "      <Tag name=\"Frame rate\" value=\"30.000 FPS\" />\r\n"
+ "      <Tag name=\"Frame count\" value=\"166\" />\r\n"
+ "      <Tag name=\"Resolution\" value=\"8\" />\r\n"
+ "      <Tag name=\"Resolution\" value=\"8 bits\" />\r\n"
+ "      <Tag name=\"Colorimetry\" value=\"4\" />\r\n"
+ "      <Tag name=\"Color space\" value=\"YUV\" />\r\n"
+ "      <Tag name=\"Chroma subsampling\" value=\"4\" />\r\n"
+ "      <Tag name=\"Chroma subsampling\" value=\"4\" />\r\n"
+ "      <Tag name=\"Bit depth\" value=\"8\" />\r\n"
+ "      <Tag name=\"Bit depth\" value=\"8 bits\" />\r\n"
+ "      <Tag name=\"Scan type\" value=\"Progressive\" />\r\n"
+ "      <Tag name=\"Scan type\" value=\"Progressive\" />\r\n"
+ "      <Tag name=\"Interlacement\" value=\"PPF\" />\r\n"
+ "      <Tag name=\"Interlacement\" value=\"Progressive\" />\r\n"
+ "      <Tag name=\"Bits/(Pixel*Frame)\" value=\"0.087\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"322069\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"315 KiB (84%)\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"315 KiB\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"315 KiB\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"315 KiB\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"314.5 KiB\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"315 KiB (84%)\" />\r\n"
+ "      <Tag name=\"Proportion of this stream\" value=\"0.83953\" />\r\n"
+ "      <Tag name=\"Writing library\" value=\"x264 - core 79\" />\r\n"
+ "      <Tag name=\"Writing library\" value=\"x264 core 79\" />\r\n"
+ "      <Tag name=\"Encoded_Library_Name\" value=\"x264\" />\r\n"
+ "      <Tag name=\"Encoded_Library_Version\" value=\"core 79\" />\r\n"
+ "      <Tag name=\"Encoding settings\" value=\"cabac=0 / ref=2 / deblock=1\" />\r\n"
+ "      <Tag name=\"Encoded date\" value=\"UTC 2010-03-20 21\" />\r\n"
+ "      <Tag name=\"Tagged date\" value=\"UTC 2010-03-20 21\" />\r\n"
+ "      <Tag name=\"Color range\" value=\"Limited\" />\r\n"
+ "      <Tag name=\"colour_description_present\" value=\"Yes\" />\r\n"
+ "      <Tag name=\"Color primaries\" value=\"BT.709\" />\r\n"
+ "      <Tag name=\"Transfer characteristics\" value=\"BT.709\" />\r\n"
+ "      <Tag name=\"Matrix coefficients\" value=\"BT.709\" />\r\n"
+ "    </Video>\r\n"
+ "    <Audio>\r\n"
+ "      <Tag name=\"Count\" value=\"275\" />\r\n"
+ "      <Tag name=\"Count of stream of this kind\" value=\"1\" />\r\n"
+ "      <Tag name=\"Kind of stream\" value=\"Audio\" />\r\n"
+ "      <Tag name=\"Kind of stream\" value=\"Audio\" />\r\n"
+ "      <Tag name=\"Stream identifier\" value=\"0\" />\r\n"
+ "      <Tag name=\"StreamOrder\" value=\"1\" />\r\n"
+ "      <Tag name=\"ID\" value=\"2\" />\r\n"
+ "      <Tag name=\"ID\" value=\"2\" />\r\n"
+ "      <Tag name=\"Format\" value=\"AAC\" />\r\n"
+ "      <Tag name=\"Format/Info\" value=\"Advanced Audio Codec\" />\r\n"
+ "      <Tag name=\"Commercial name\" value=\"AAC\" />\r\n"
+ "      <Tag name=\"Format profile\" value=\"LC\" />\r\n"
+ "      <Tag name=\"Codec ID\" value=\"mp4a-40-2\" />\r\n"
+ "      <Tag name=\"Codec\" value=\"AAC LC\" />\r\n"
+ "      <Tag name=\"Codec\" value=\"AAC LC\" />\r\n"
+ "      <Tag name=\"Codec/Family\" value=\"AAC\" />\r\n"
+ "      <Tag name=\"Codec/CC\" value=\"40\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"5568\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"5 s 568 ms\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"5 s 568 ms\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"5 s 568 ms\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"00\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"00\" />\r\n"
+ "      <Tag name=\"Duration\" value=\"00\" />\r\n"
+ "      <Tag name=\"Bit rate mode\" value=\"VBR\" />\r\n"
+ "      <Tag name=\"Bit rate mode\" value=\"Variable\" />\r\n"
+ "      <Tag name=\"Bit rate\" value=\"83051\" />\r\n"
+ "      <Tag name=\"Bit rate\" value=\"83.1 kb/s\" />\r\n"
+ "      <Tag name=\"Maximum bit rate\" value=\"91632\" />\r\n"
+ "      <Tag name=\"Maximum bit rate\" value=\"91.6 kb/s\" />\r\n"
+ "      <Tag name=\"Channel(s)\" value=\"1\" />\r\n"
+ "      <Tag name=\"Channel(s)\" value=\"1 channel\" />\r\n"
+ "      <Tag name=\"Channel positions\" value=\"Front\" />\r\n"
+ "      <Tag name=\"Channel positions\" value=\"1/0/0\" />\r\n"
+ "      <Tag name=\"ChannelLayout\" value=\"C\" />\r\n"
+ "      <Tag name=\"Samples per frame\" value=\"1024\" />\r\n"
+ "      <Tag name=\"Sampling rate\" value=\"48000\" />\r\n"
+ "      <Tag name=\"Sampling rate\" value=\"48.0 kHz\" />\r\n"
+ "      <Tag name=\"Samples count\" value=\"267264\" />\r\n"
+ "      <Tag name=\"Frame rate\" value=\"46.875\" />\r\n"
+ "      <Tag name=\"Frame rate\" value=\"46.875 FPS (1024 SPF)\" />\r\n"
+ "      <Tag name=\"Frame count\" value=\"261\" />\r\n"
+ "      <Tag name=\"Compression mode\" value=\"Lossy\" />\r\n"
+ "      <Tag name=\"Compression mode\" value=\"Lossy\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"57803\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"56.4 KiB (15%)\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"56 KiB\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"56 KiB\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"56.4 KiB\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"56.45 KiB\" />\r\n"
+ "      <Tag name=\"Stream size\" value=\"56.4 KiB (15%)\" />\r\n"
+ "      <Tag name=\"Proportion of this stream\" value=\"0.15067\" />\r\n"
+ "      <Tag name=\"Title\" value=\"Stereo\" />\r\n"
+ "      <Tag name=\"Language\" value=\"en\" />\r\n"
+ "      <Tag name=\"Language\" value=\"English\" />\r\n"
+ "      <Tag name=\"Language\" value=\"English\" />\r\n"
+ "      <Tag name=\"Language\" value=\"en\" />\r\n"
+ "      <Tag name=\"Language\" value=\"eng\" />\r\n"
+ "      <Tag name=\"Language\" value=\"en\" />\r\n"
+ "      <Tag name=\"Encoded date\" value=\"UTC 2010-03-20 21\" />\r\n"
+ "      <Tag name=\"Tagged date\" value=\"UTC 2010-03-20 21\" />\r\n"
+ "    </Audio>\r\n"
+ "  </File>\r\n"
+ "</Files>";

        [TestInitialize]
        public void TestInitialize()
        {
            Helper.DeleteFiles(MediaInfoFolder);
        }

        [TestCleanup]
        public void TestCleanup()
        {
            Helper.DeleteFiles(MediaInfoFolder);
        }

        [TestMethod]
        public void Run()
        {
            string[] files = GetFiles();
            Assert.AreEqual(0, files.Length);
            Helper.StartWorkflow(52);
            files = GetFiles();
            Assert.AreEqual(1, files.Length);
            string content = File.ReadAllText(files[0]);
            Assert.AreEqual(ExpectedResult, content);
        }

        private string[] GetFiles()
        {
            return Directory.GetFiles(MediaInfoFolder, "MediaInfo_*.xml");
        }
    }
}
